package cn.fourthquestion;

public class BaconPizza extends Pizza{
    private int kg;
    public BaconPizza() {
    }

    public BaconPizza(String name, double price, int size,int kg) {
        super(name, price, size);
        this.kg=kg;
    }

    public int getKg() {
        return kg;
    }

    public void setKg(int kg) {
        this.kg = kg;
    }

    public void show(){
        System.out.println("名称："+getName()+"\n价格:"+getPrice()+"元\n大小："+getSize()+"寸\n克数："+kg +"克");
    }
}
